//
//  RegisterViewController.m
//  Unicorn
//
//  Created by xalo on 16/5/4.
//  Copyright © 2016年 bhj_jun. All rights reserved.
//

#import "RegisterViewController.h"

@interface RegisterViewController ()

@property (strong, nonatomic) IBOutlet UIImageView *backimg;

@property (strong, nonatomic) IBOutlet UIButton *sureRegisterBtn;//确认注册btn

@property (strong, nonatomic) IBOutlet UIImageView *numberImg;//设置账号img

@property (strong, nonatomic) IBOutlet UIImageView *passwordImg;//设置密码img

@property (strong, nonatomic) IBOutlet UIImageView *againPasswordImg;//再次设置密码img

@property (strong, nonatomic) IBOutlet UITextField *numberTF;//请设置账号textField

@property (strong, nonatomic) IBOutlet UITextField *passwordTF;//请设置密码textField

@property (strong, nonatomic) IBOutlet UITextField *againPasswordTF;//请再次输入密码



@end

@implementation RegisterViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationItem.title = @"注册";
    
    [self viewSetting];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


#pragma mark - - 界面设置
-(void)viewSetting
{
    self.sureRegisterBtn.layer.cornerRadius = 50;
    self.sureRegisterBtn.layer.masksToBounds = YES;
    
    self.numberImg.layer.cornerRadius = 15;
    self.numberImg.layer.masksToBounds = YES;
    self.passwordImg.layer.cornerRadius = 15;
    self.passwordImg.layer.masksToBounds = YES;
    self.againPasswordImg.layer.cornerRadius = 15;
    self.againPasswordImg.layer.masksToBounds = YES;
    
    self.numberTF.borderStyle = UITextBorderStyleNone;
    self.passwordTF.borderStyle = UITextBorderStyleNone;
    self.againPasswordTF.borderStyle = UITextBorderStyleNone;
    
    
    //返回
    self.navigationItem.leftBarButtonItem = ({
        
        UIBarButtonItem *item = [[UIBarButtonItem alloc]
                                 initWithTitle:@"back"
                                style:UIBarButtonItemStylePlain target:self
                                action:@selector(itemAction:)];
        item;
    });
    
    //轻拍手势
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapAction:)];
    [self.view addGestureRecognizer:tap];
}

#pragma mark - - 按钮事件
//返回事件
-(void)itemAction:(UIBarButtonItem *)sender
{
    [self dismissViewControllerAnimated:YES completion:nil];
    
}

//确认注册事件
- (IBAction)sureRegisterAction:(UIButton *)sender {
}

//取消第一响应
-(void)tapAction:(UITapGestureRecognizer *)sender
{
    [self.view endEditing:YES];
}


@end
